//01 生成区间范围的随机整数
function randomIntegers(a, b) {
    //1.先拿到最大值和最小值
    var min = Math.min(a, b)
    var max = Math.max(a, b)

    //2.计算方式
    var res = Math.floor(Math.random() * (max - min + 1)) + min

    //把结果返回出去
    return res
}

//02 标准日期时间格式化  yy-mm-dd 00:00:00
function formDate(date) {
    if (date == "") {
        return "";
    } else if (date == null) {
        return "";
    } else if (date == undefined) {
        return "";
    } else {
        var d = new Date(date);
        target =
            d.getFullYear() +
            "-" +
            (d.getMonth() + 1) +
            "-" +
            d.getDate() +
            " " +
            d.getHours() +
            ":" +
            d.getMinutes() +
            ":" +
            d.getSeconds();
        return target;
    }
}